#ifndef USERINFO_H
#define USERINFO_H

#include <QString>
#include "../common/singleton.h"

class UserInfo
{
    QString UserName;
    QString curRoom;
    bool closeable=false;

    friend SingleTon<UserInfo>;
    UserInfo();
    UserInfo(const UserInfo&) = delete ;
    UserInfo(UserInfo&&) = delete ;

public:
    void setUsername(const QString& username) {UserName = username;}
    QString& getUsername() {return UserName;}

    void setCurRoom(const QString& roomid) {curRoom = roomid;}
    QString& getCurRoom() {return curRoom;}

    void setcloseable(){closeable=true;}
    void notcloseable(){closeable=false;}
    bool ifcloseable(){return closeable;}
};

#endif // USERINFO_H
